<?php

$name='tom   or';
$real_flag=true;
$terrible=Array('and','or','AND','OR','--','\'',"\"");
foreach ($terrible as $key=>$vol){
//    print_r();
    $real_flag&=(strpos($name,$vol)==null);
}
echo $real_flag;


?>
